/**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//
// @@@ END COPYRIGHT @@@
**********************************************************************/
/*
 * HISTORY
 * $Log: gb18030_data.c,v $
 * Revision 1.1.4.3  2000/12/12  15:55:45
 * 	Incorporate update due to the new GB18030 to UCS conversion table.
 *
 * Revision 1.1.4.1  2000/10/16  18:44:50
 * 	COSIX.Zulu to Yankee merge for GB18030 support.
 *
 * Revision 1.1.2.1  2000/08/07  14:33:47
 * 	Special GB18030 mapping data file to be included in from_GB18030.c.
 *
 * $EndLog$
 */

/*
 * Table based UDC to GB18030 mapping
 * Value >= 0xa1a1 is 2-byte code, value < 0xa1a1 is 4-byte index.
 */
static const ushort_t udc_gb_table[] =  // JAC 
{
  0xa2ab, 0xa2ac, 0xa2ad, 0xa2ae, 0xa2af, 0xa2b0, 0x82bd, 0xa2e4, 
  0xa2ef, 0xa2f0, 0xa2fd, 0xa2fe, 0xa4f4, 0xa4f5, 0xa4f6, 0xa4f7, 
  0xa4f8, 0xa4f9, 0xa4fa, 0xa4fb, 0xa4fc, 0xa4fd, 0xa4fe, 0xa5f7, 
  0xa5f8, 0xa5f9, 0xa5fa, 0xa5fb, 0xa5fc, 0xa5fd, 0xa5fe, 0xa6b9, 
  0xa6ba, 0xa6bb, 0xa6bc, 0xa6bd, 0xa6be, 0xa6bf, 0xa6c0, 0xa6d9, 
  0xa6da, 0xa6db, 0xa6dc, 0xa6dd, 0xa6de, 0xa6df, 0xa6ec, 0xa6ed, 
  0xa6f3, 0xa6f6, 0xa6f7, 0xa6f8, 0xa6f9, 0xa6fa, 0xa6fb, 0xa6fc, 
  0xa6fd, 0xa6fe, 0xa7c2, 0xa7c3, 0xa7c4, 0xa7c5, 0xa7c6, 0xa7c7, 
  0xa7c8, 0xa7c9, 0xa7ca, 0xa7cb, 0xa7cc, 0xa7cd, 0xa7ce, 0xa7cf, 
  0xa7d0, 0xa7f2, 0xa7f3, 0xa7f4, 0xa7f5, 0xa7f6, 0xa7f7, 0xa7f8, 
  0xa7f9, 0xa7fa, 0xa7fb, 0xa7fc, 0xa7fd, 0xa7fe, 0xa896, 0xa897, 
  0xa898, 0xa899, 0xa89a, 0xa89b, 0xa89c, 0xa89d, 0xa89e, 0xa89f, 
  0xa8a0, 0xa8bc, 0x82be, 0xa8c1, 0xa8c2, 0xa8c3, 0xa8c4, 0xa8ea, 
  0xa8eb, 0xa8ec, 0xa8ed, 0xa8ee, 0xa8ef, 0xa8f0, 0xa8f1, 0xa8f2, 
  0xa8f3, 0xa8f4, 0xa8f5, 0xa8f6, 0xa8f7, 0xa8f8, 0xa8f9, 0xa8fa, 
  0xa8fb, 0xa8fc, 0xa8fd, 0xa8fe, 0xa958, 0xa95b, 0xa95d, 0xa95e, 
  0xa95f, 0x82bf, 0x82c0, 0x82c1, 0x82c2, 0x82c3, 0x82c4, 0x82c5, 
  0x82c6, 0x82c7, 0x82c8, 0x82c9, 0x82ca, 0x82cb, 0xa997, 0xa998, 
  0xa999, 0xa99a, 0xa99b, 0xa99c, 0xa99d, 0xa99e, 0xa99f, 0xa9a0, 
  0xa9a1, 0xa9a2, 0xa9a3, 0xa9f0, 0xa9f1, 0xa9f2, 0xa9f3, 0xa9f4, 
  0xa9f5, 0xa9f6, 0xa9f7, 0xa9f8, 0xa9f9, 0xa9fa, 0xa9fb, 0xa9fc, 
  0xa9fd, 0xa9fe, 0xd7fa, 0xd7fb, 0xd7fc, 0xd7fd, 0xd7fe, 0x82cc, 
  0xfe51, 0xfe52, 0xfe53, 0x82cd, 0x82ce, 0x82cf, 0x82d0, 0x82d1, 
  0xfe59, 0x82d2, 0x82d3, 0x82d4, 0x82d5, 0x82d6, 0x82d7, 0x82d8, 
  0xfe61, 0x82d9, 0x82da, 0x82db, 0x82dc, 0xfe66, 0xfe67, 0x82dd, 
  0x82de, 0x82df, 0x82e0, 0xfe6c, 0xfe6d, 0x82e1, 0x82e2, 0x82e3, 
  0x82e4, 0x82e5, 0x82e6, 0x82e7, 0x82e8, 0xfe76, 0x82e9, 0x82ea, 
  0x82eb, 0x82ec, 0x82ed, 0x82ee, 0x82ef, 0xfe7e, 0x82f0, 0x82f1, 
  0x82f2, 0x82f3, 0x82f4, 0x82f5, 0x82f6, 0x82f7, 0x82f8, 0x82f9, 
  0x82fa, 0x82fb, 0x82fc, 0x82fd, 0x82fe, 0x82ff, 0xfe90, 0xfe91, 
  0x8300, 0x8301, 0x8302, 0x8303, 0x8304, 0x8305, 0x8306, 0x8307, 
  0x8308, 0x8309, 0x830a, 0x830b, 0x830c, 0x830d, 0xfea0
} ;

/*
 * 4-byte GB18030 index to UCS value mapping table
 * { <4-byte-GB18030-index> <UCS-offset> }
 */
static const gb4idx_ucs_t gb4idx_ucs_table[] = 
{
  { 0x0000,    128 }, /* GB18030 = 0x81308130, UCS = U+0080 */
  { 0x0024,    129 }, /* GB18030 = 0x81308436, UCS = U+00A5 */
  { 0x0026,    131 }, /* GB18030 = 0x81308438, UCS = U+00A9 */
  { 0x002D,    133 }, /* GB18030 = 0x81308535, UCS = U+00B2 */
  { 0x0032,    134 }, /* GB18030 = 0x81308630, UCS = U+00B8 */
  { 0x0051,    135 }, /* GB18030 = 0x81308931, UCS = U+00D8 */
  { 0x0059,    137 }, /* GB18030 = 0x81308939, UCS = U+00E2 */
  { 0x005F,    140 }, /* GB18030 = 0x81308a35, UCS = U+00EB */
  { 0x0060,    142 }, /* GB18030 = 0x81308a36, UCS = U+00EE */
  { 0x0064,    144 }, /* GB18030 = 0x81308b30, UCS = U+00F4 */
  { 0x0067,    145 }, /* GB18030 = 0x81308b33, UCS = U+00F8 */
  { 0x0068,    147 }, /* GB18030 = 0x81308b34, UCS = U+00FB */
  { 0x0069,    148 }, /* GB18030 = 0x81308b35, UCS = U+00FD */
  { 0x006D,    149 }, /* GB18030 = 0x81308b39, UCS = U+0102 */
  { 0x007E,    150 }, /* GB18030 = 0x81308d36, UCS = U+0114 */
  { 0x0085,    151 }, /* GB18030 = 0x81308e33, UCS = U+011C */
  { 0x0094,    152 }, /* GB18030 = 0x81308f38, UCS = U+012C */
  { 0x00AC,    153 }, /* GB18030 = 0x81309232, UCS = U+0145 */
  { 0x00AF,    154 }, /* GB18030 = 0x81309235, UCS = U+0149 */
  { 0x00B3,    155 }, /* GB18030 = 0x81309239, UCS = U+014E */
  { 0x00D0,    156 }, /* GB18030 = 0x81309538, UCS = U+016C */
  { 0x0132,    157 }, /* GB18030 = 0x81309f36, UCS = U+01CF */
  { 0x0133,    158 }, /* GB18030 = 0x81309f37, UCS = U+01D1 */
  { 0x0134,    159 }, /* GB18030 = 0x81309f38, UCS = U+01D3 */
  { 0x0135,    160 }, /* GB18030 = 0x81309f39, UCS = U+01D5 */
  { 0x0136,    161 }, /* GB18030 = 0x8130a030, UCS = U+01D7 */
  { 0x0137,    162 }, /* GB18030 = 0x8130a031, UCS = U+01D9 */
  { 0x0138,    163 }, /* GB18030 = 0x8130a032, UCS = U+01DB */
  { 0x0139,    164 }, /* GB18030 = 0x8130a033, UCS = U+01DD */
  { 0x0155,    165 }, /* GB18030 = 0x8130a331, UCS = U+01FA */
  { 0x01AC,    166 }, /* GB18030 = 0x8130ab38, UCS = U+0252 */
  { 0x01BB,    167 }, /* GB18030 = 0x8130ad33, UCS = U+0262 */
  { 0x0220,    168 }, /* GB18030 = 0x8130b734, UCS = U+02C8 */
  { 0x0221,    171 }, /* GB18030 = 0x8130b735, UCS = U+02CC */
  { 0x022E,    172 }, /* GB18030 = 0x8130b838, UCS = U+02DA */
  { 0x02E5,    189 }, /* GB18030 = 0x8130cb31, UCS = U+03A2 */
  { 0x02E6,    196 }, /* GB18030 = 0x8130cb32, UCS = U+03AA */
  { 0x02ED,    213 }, /* GB18030 = 0x8130cb39, UCS = U+03C2 */
  { 0x02EE,    220 }, /* GB18030 = 0x8130cc30, UCS = U+03CA */
  { 0x0325,    221 }, /* GB18030 = 0x8130d135, UCS = U+0402 */
  { 0x0333,    285 }, /* GB18030 = 0x8130d239, UCS = U+0450 */
  { 0x0334,    286 }, /* GB18030 = 0x8130d330, UCS = U+0452 */
  { 0x1EF2,    287 }, /* GB18030 = 0x8136a532, UCS = U+2011 */
  { 0x1EF4,    291 }, /* GB18030 = 0x8136a534, UCS = U+2017 */
  { 0x1EF5,    293 }, /* GB18030 = 0x8136a535, UCS = U+201A */
  { 0x1EF7,    295 }, /* GB18030 = 0x8136a537, UCS = U+201E */
  { 0x1EFE,    297 }, /* GB18030 = 0x8136a634, UCS = U+2027 */
  { 0x1F07,    298 }, /* GB18030 = 0x8136a733, UCS = U+2031 */
  { 0x1F08,    300 }, /* GB18030 = 0x8136a734, UCS = U+2034 */
  { 0x1F09,    301 }, /* GB18030 = 0x8136a735, UCS = U+2036 */
  { 0x1F0E,    302 }, /* GB18030 = 0x8136a830, UCS = U+203C */
  { 0x1F7E,    303 }, /* GB18030 = 0x8136b332, UCS = U+20AD */
  { 0x1FD4,    304 }, /* GB18030 = 0x8136bb38, UCS = U+2104 */
  { 0x1FD5,    305 }, /* GB18030 = 0x8136bb39, UCS = U+2106 */
  { 0x1FD8,    306 }, /* GB18030 = 0x8136bc32, UCS = U+210A */
  { 0x1FE4,    307 }, /* GB18030 = 0x8136bd34, UCS = U+2117 */
  { 0x1FEE,    308 }, /* GB18030 = 0x8136be34, UCS = U+2122 */
  { 0x202C,    320 }, /* GB18030 = 0x8136c436, UCS = U+216C */
  { 0x2030,    330 }, /* GB18030 = 0x8136c530, UCS = U+217A */
  { 0x2046,    334 }, /* GB18030 = 0x8136c732, UCS = U+2194 */
  { 0x2048,    338 }, /* GB18030 = 0x8136c734, UCS = U+219A */
  { 0x20B6,    339 }, /* GB18030 = 0x8136d234, UCS = U+2209 */
  { 0x20BC,    340 }, /* GB18030 = 0x8136d330, UCS = U+2210 */
  { 0x20BD,    341 }, /* GB18030 = 0x8136d331, UCS = U+2212 */
  { 0x20C0,    342 }, /* GB18030 = 0x8136d334, UCS = U+2216 */
  { 0x20C4,    343 }, /* GB18030 = 0x8136d338, UCS = U+221B */
  { 0x20C6,    347 }, /* GB18030 = 0x8136d430, UCS = U+2221 */
  { 0x20C8,    348 }, /* GB18030 = 0x8136d432, UCS = U+2224 */
  { 0x20C9,    349 }, /* GB18030 = 0x8136d433, UCS = U+2226 */
  { 0x20CA,    354 }, /* GB18030 = 0x8136d434, UCS = U+222C */
  { 0x20CC,    355 }, /* GB18030 = 0x8136d436, UCS = U+222F */
  { 0x20D1,    359 }, /* GB18030 = 0x8136d531, UCS = U+2238 */
  { 0x20D6,    360 }, /* GB18030 = 0x8136d536, UCS = U+223E */
  { 0x20E0,    361 }, /* GB18030 = 0x8136d636, UCS = U+2249 */
  { 0x20E3,    362 }, /* GB18030 = 0x8136d639, UCS = U+224D */
  { 0x20E8,    363 }, /* GB18030 = 0x8136d734, UCS = U+2253 */
  { 0x20F5,    365 }, /* GB18030 = 0x8136d837, UCS = U+2262 */
  { 0x20F7,    369 }, /* GB18030 = 0x8136d839, UCS = U+2268 */
  { 0x20FD,    371 }, /* GB18030 = 0x8136d935, UCS = U+2270 */
  { 0x2122,    372 }, /* GB18030 = 0x8136dd32, UCS = U+2296 */
  { 0x2125,    373 }, /* GB18030 = 0x8136dd35, UCS = U+229A */
  { 0x2130,    374 }, /* GB18030 = 0x8136de36, UCS = U+22A6 */
  { 0x2149,    375 }, /* GB18030 = 0x8136e131, UCS = U+22C0 */
  { 0x219B,    376 }, /* GB18030 = 0x8136e933, UCS = U+2313 */
  { 0x22E8,    386 }, /* GB18030 = 0x81378c36, UCS = U+246A */
  { 0x22F2,    426 }, /* GB18030 = 0x81378d36, UCS = U+249C */
  { 0x2356,    502 }, /* GB18030 = 0x81379736, UCS = U+254C */
  { 0x235A,    538 }, /* GB18030 = 0x81379830, UCS = U+2574 */
  { 0x2367,    553 }, /* GB18030 = 0x81379933, UCS = U+2590 */
  { 0x236A,    556 }, /* GB18030 = 0x81379936, UCS = U+2596 */
  { 0x2374,    558 }, /* GB18030 = 0x81379a36, UCS = U+25A2 */
  { 0x2384,    560 }, /* GB18030 = 0x81379c32, UCS = U+25B4 */
  { 0x238C,    562 }, /* GB18030 = 0x81379d30, UCS = U+25BE */
  { 0x2394,    564 }, /* GB18030 = 0x81379d38, UCS = U+25C8 */
  { 0x2397,    565 }, /* GB18030 = 0x81379e31, UCS = U+25CC */
  { 0x2399,    567 }, /* GB18030 = 0x81379e33, UCS = U+25D0 */
  { 0x23AB,    571 }, /* GB18030 = 0x8137a031, UCS = U+25E6 */
  { 0x23CA,    573 }, /* GB18030 = 0x8137a332, UCS = U+2607 */
  { 0x23CC,    574 }, /* GB18030 = 0x8137a334, UCS = U+260A */
  { 0x2402,    575 }, /* GB18030 = 0x8137a838, UCS = U+2641 */
  { 0x2403,    576 }, /* GB18030 = 0x8137a839, UCS = U+2643 */
  { 0x2C41,    577 }, /* GB18030 = 0x8138fd39, UCS = U+2E82 */
  { 0x2C43,    578 }, /* GB18030 = 0x8138fe31, UCS = U+2E85 */
  { 0x2C46,    579 }, /* GB18030 = 0x8138fe34, UCS = U+2E89 */
  { 0x2C48,    581 }, /* GB18030 = 0x8138fe36, UCS = U+2E8D */
  { 0x2C52,    582 }, /* GB18030 = 0x81398136, UCS = U+2E98 */
  { 0x2C61,    583 }, /* GB18030 = 0x81398331, UCS = U+2EA8 */
  { 0x2C63,    584 }, /* GB18030 = 0x81398333, UCS = U+2EAB */
  { 0x2C66,    585 }, /* GB18030 = 0x81398336, UCS = U+2EAF */
  { 0x2C6A,    586 }, /* GB18030 = 0x81398430, UCS = U+2EB4 */
  { 0x2C6C,    588 }, /* GB18030 = 0x81398432, UCS = U+2EB8 */
  { 0x2C6F,    589 }, /* GB18030 = 0x81398435, UCS = U+2EBC */
  { 0x2C7D,    590 }, /* GB18030 = 0x81398539, UCS = U+2ECB */
  { 0x2DA2,    602 }, /* GB18030 = 0x8139a332, UCS = U+2FFC */
  { 0x2DA6,    606 }, /* GB18030 = 0x8139a336, UCS = U+3004 */
  { 0x2DA7,    625 }, /* GB18030 = 0x8139a337, UCS = U+3018 */
  { 0x2DAC,    627 }, /* GB18030 = 0x8139a432, UCS = U+301F */
  { 0x2DAE,    636 }, /* GB18030 = 0x8139a434, UCS = U+302A */
  { 0x2DC2,    637 }, /* GB18030 = 0x8139a634, UCS = U+303F */
  { 0x2DC4,    720 }, /* GB18030 = 0x8139a636, UCS = U+3094 */
  { 0x2DCB,    724 }, /* GB18030 = 0x8139a733, UCS = U+309F */
  { 0x2DCD,    810 }, /* GB18030 = 0x8139a735, UCS = U+30F7 */
  { 0x2DD2,    813 }, /* GB18030 = 0x8139a830, UCS = U+30FF */
  { 0x2DD8,    850 }, /* GB18030 = 0x8139a836, UCS = U+312A */
  { 0x2ECE,    860 }, /* GB18030 = 0x8139c132, UCS = U+322A */
  { 0x2ED5,    861 }, /* GB18030 = 0x8139c139, UCS = U+3232 */
  { 0x2F46,    862 }, /* GB18030 = 0x8139cd32, UCS = U+32A4 */
  { 0x3030,    864 }, /* GB18030 = 0x8139e436, UCS = U+3390 */
  { 0x303C,    867 }, /* GB18030 = 0x8139e538, UCS = U+339F */
  { 0x303E,    868 }, /* GB18030 = 0x8139e630, UCS = U+33A2 */
  { 0x3060,    869 }, /* GB18030 = 0x8139e934, UCS = U+33C5 */
  { 0x3069,    870 }, /* GB18030 = 0x8139ea33, UCS = U+33CF */
  { 0x306B,    872 }, /* GB18030 = 0x8139ea35, UCS = U+33D3 */
  { 0x306D,    873 }, /* GB18030 = 0x8139ea37, UCS = U+33D6 */
  { 0x30DE,    874 }, /* GB18030 = 0x8139f630, UCS = U+3448 */
  { 0x3109,    875 }, /* GB18030 = 0x8139fa33, UCS = U+3474 */
  { 0x3233,    876 }, /* GB18030 = 0x82309a31, UCS = U+359F */
  { 0x32A2,    877 }, /* GB18030 = 0x8230a532, UCS = U+360F */
  { 0x32AD,    878 }, /* GB18030 = 0x8230a633, UCS = U+361B */
  { 0x35AA,    879 }, /* GB18030 = 0x8230f238, UCS = U+3919 */
  { 0x35FF,    880 }, /* GB18030 = 0x8230fb33, UCS = U+396F */
  { 0x365F,    882 }, /* GB18030 = 0x82318639, UCS = U+39D1 */
  { 0x366D,    883 }, /* GB18030 = 0x82318833, UCS = U+39E0 */
  { 0x3700,    884 }, /* GB18030 = 0x82319730, UCS = U+3A74 */
  { 0x37DA,    885 }, /* GB18030 = 0x8231ac38, UCS = U+3B4F */
  { 0x38F9,    886 }, /* GB18030 = 0x8231c935, UCS = U+3C6F */
  { 0x396A,    887 }, /* GB18030 = 0x8231d438, UCS = U+3CE1 */
  { 0x3CDF,    888 }, /* GB18030 = 0x8232af33, UCS = U+4057 */
  { 0x3DE7,    889 }, /* GB18030 = 0x8232c937, UCS = U+4160 */
  { 0x3FBE,    890 }, /* GB18030 = 0x8232f838, UCS = U+4338 */
  { 0x4032,    891 }, /* GB18030 = 0x82338634, UCS = U+43AD */
  { 0x4036,    892 }, /* GB18030 = 0x82338638, UCS = U+43B2 */
  { 0x4061,    893 }, /* GB18030 = 0x82338b31, UCS = U+43DE */
  { 0x4159,    894 }, /* GB18030 = 0x8233a339, UCS = U+44D7 */
  { 0x42CE,    895 }, /* GB18030 = 0x8233c932, UCS = U+464D */
  { 0x42E2,    896 }, /* GB18030 = 0x8233cb32, UCS = U+4662 */
  { 0x43A3,    897 }, /* GB18030 = 0x8233de35, UCS = U+4724 */
  { 0x43A8,    898 }, /* GB18030 = 0x8233df30, UCS = U+472A */
  { 0x43FA,    899 }, /* GB18030 = 0x8233e732, UCS = U+477D */
  { 0x440A,    900 }, /* GB18030 = 0x8233e838, UCS = U+478E */
  { 0x45C3,    901 }, /* GB18030 = 0x82349639, UCS = U+4948 */
  { 0x45F5,    902 }, /* GB18030 = 0x82349b39, UCS = U+497B */
  { 0x45F7,    903 }, /* GB18030 = 0x82349c31, UCS = U+497E */
  { 0x45FB,    905 }, /* GB18030 = 0x82349c35, UCS = U+4984 */
  { 0x45FC,    907 }, /* GB18030 = 0x82349c36, UCS = U+4987 */
  { 0x4610,    908 }, /* GB18030 = 0x82349e36, UCS = U+499C */
  { 0x4613,    909 }, /* GB18030 = 0x82349e39, UCS = U+49A0 */
  { 0x4629,    911 }, /* GB18030 = 0x8234a131, UCS = U+49B8 */
  { 0x48E8,    912 }, /* GB18030 = 0x8234e734, UCS = U+4C78 */
  { 0x490F,    917 }, /* GB18030 = 0x8234eb33, UCS = U+4CA4 */
  { 0x497E,    924 }, /* GB18030 = 0x8234f634, UCS = U+4D1A */
  { 0x4A12,    925 }, /* GB18030 = 0x82358732, UCS = U+4DAF */
  { 0x4A63,  21827 }, /* GB18030 = 0x82358f33, UCS = U+9FA6 */
  { 0x82BD,  25775 }, /* GB18030 = 0x8336c739, UCS = U+E76C */
  { 0x82BE,  25866 }, /* GB18030 = 0x8336c830, UCS = U+E7C8 */
  { 0x82BF,  25896 }, /* GB18030 = 0x8336c831, UCS = U+E7E7 */
  { 0x82CC,  25929 }, /* GB18030 = 0x8336c934, UCS = U+E815 */
  { 0x82CD,  25932 }, /* GB18030 = 0x8336c935, UCS = U+E819 */
  { 0x82D2,  25933 }, /* GB18030 = 0x8336ca30, UCS = U+E81F */
  { 0x82D9,  25934 }, /* GB18030 = 0x8336ca37, UCS = U+E827 */
  { 0x82DD,  25936 }, /* GB18030 = 0x8336cb31, UCS = U+E82D */
  { 0x82E1,  25938 }, /* GB18030 = 0x8336cb35, UCS = U+E833 */
  { 0x82E9,  25939 }, /* GB18030 = 0x8336cc33, UCS = U+E83C */
  { 0x82F0,  25940 }, /* GB18030 = 0x8336cd30, UCS = U+E844 */
  { 0x8300,  25942 }, /* GB18030 = 0x8336ce36, UCS = U+E856 */
  { 0x830E,  25943 }, /* GB18030 = 0x8336d030, UCS = U+E865 */
  { 0x93D5,  25944 }, /* GB18030 = 0x84308535, UCS = U+F92D */
  { 0x9421,  25945 }, /* GB18030 = 0x84308d31, UCS = U+F97A */
  { 0x943C,  25946 }, /* GB18030 = 0x84308f38, UCS = U+F996 */
  { 0x948D,  25947 }, /* GB18030 = 0x84309739, UCS = U+F9E8 */
  { 0x9496,  25948 }, /* GB18030 = 0x84309838, UCS = U+F9F2 */
  { 0x94B0,  25952 }, /* GB18030 = 0x84309b34, UCS = U+FA10 */
  { 0x94B1,  25953 }, /* GB18030 = 0x84309b35, UCS = U+FA12 */
  { 0x94B2,  25955 }, /* GB18030 = 0x84309b36, UCS = U+FA15 */
  { 0x94B5,  25956 }, /* GB18030 = 0x84309b39, UCS = U+FA19 */
  { 0x94BB,  25959 }, /* GB18030 = 0x84309c35, UCS = U+FA22 */
  { 0x94BC,  25961 }, /* GB18030 = 0x84309c36, UCS = U+FA25 */
  { 0x94BE,  25964 }, /* GB18030 = 0x84309c38, UCS = U+FA2A */
  { 0x98C4,  25966 }, /* GB18030 = 0x84318538, UCS = U+FE32 */
  { 0x98C5,  25984 }, /* GB18030 = 0x84318539, UCS = U+FE45 */
  { 0x98C9,  25994 }, /* GB18030 = 0x84318633, UCS = U+FE53 */
  { 0x98CA,  25998 }, /* GB18030 = 0x84318634, UCS = U+FE58 */
  { 0x98CB,  26012 }, /* GB18030 = 0x84318635, UCS = U+FE67 */
  { 0x98CC,  26016 }, /* GB18030 = 0x84318636, UCS = U+FE6C */
  { 0x9961,  26110 }, /* GB18030 = 0x84319535, UCS = U+FF5F */
  { 0x99E2,  26116 }, /* GB18030 = 0x8431a234, UCS = U+FFE6 */
  { 0x99FA,  26116 }  /* GB18030 = 0x8431a438, UCS = U+FFFE */
} ;

/*
 * UCS value to 4-byte  GB18030 index mapping table
 * { <low-UCS-value> <high-UCS-value> <GB18030-index-offset> }
 */
static const ucs_gb4idx_t ucs_gb4idx_table[] =
{
  { 0x0080, 0x00A3,   -128 },
  { 0x00A5, 0x00A6,   -129 },
  { 0x00A9, 0x00AF,   -131 },
  { 0x00B2, 0x00B6,   -133 },
  { 0x00B8, 0x00D6,   -134 },
  { 0x00D8, 0x00DF,   -135 },
  { 0x00E2, 0x00E7,   -137 },
  { 0x00EB, 0x00EB,   -140 },
  { 0x00EE, 0x00F1,   -142 },
  { 0x00F4, 0x00F6,   -144 },
  { 0x00F8, 0x00F8,   -145 },
  { 0x00FB, 0x00FB,   -147 },
  { 0x00FD, 0x0100,   -148 },
  { 0x0102, 0x0112,   -149 },
  { 0x0114, 0x011A,   -150 },
  { 0x011C, 0x012A,   -151 },
  { 0x012C, 0x0143,   -152 },
  { 0x0145, 0x0147,   -153 },
  { 0x0149, 0x014C,   -154 },
  { 0x014E, 0x016A,   -155 },
  { 0x016C, 0x01CD,   -156 },
  { 0x01CF, 0x01CF,   -157 },
  { 0x01D1, 0x01D1,   -158 },
  { 0x01D3, 0x01D3,   -159 },
  { 0x01D5, 0x01D5,   -160 },
  { 0x01D7, 0x01D7,   -161 },
  { 0x01D9, 0x01D9,   -162 },
  { 0x01DB, 0x01DB,   -163 },
  { 0x01DD, 0x01F8,   -164 },
  { 0x01FA, 0x0250,   -165 },
  { 0x0252, 0x0260,   -166 },
  { 0x0262, 0x02C6,   -167 },
  { 0x02C8, 0x02C8,   -168 },
  { 0x02CC, 0x02D8,   -171 },
  { 0x02DA, 0x0390,   -172 },
  { 0x03A2, 0x03A2,   -189 },
  { 0x03AA, 0x03B0,   -196 },
  { 0x03C2, 0x03C2,   -213 },
  { 0x03CA, 0x0400,   -220 },
  { 0x0402, 0x040F,   -221 },
  { 0x0450, 0x0450,   -285 },
  { 0x0452, 0x200F,   -286 },
  { 0x2011, 0x2012,   -287 },
  { 0x2017, 0x2017,   -291 },
  { 0x201A, 0x201B,   -293 },
  { 0x201E, 0x2024,   -295 },
  { 0x2027, 0x202F,   -297 },
  { 0x2031, 0x2031,   -298 },
  { 0x2034, 0x2034,   -300 },
  { 0x2036, 0x203A,   -301 },
  { 0x203C, 0x20AB,   -302 },
  { 0x20AD, 0x2102,   -303 },
  { 0x2104, 0x2104,   -304 },
  { 0x2106, 0x2108,   -305 },
  { 0x210A, 0x2115,   -306 },
  { 0x2117, 0x2120,   -307 },
  { 0x2122, 0x215F,   -308 },
  { 0x216C, 0x216F,   -320 },
  { 0x217A, 0x218F,   -330 },
  { 0x2194, 0x2195,   -334 },
  { 0x219A, 0x2207,   -338 },
  { 0x2209, 0x220E,   -339 },
  { 0x2210, 0x2210,   -340 },
  { 0x2212, 0x2214,   -341 },
  { 0x2216, 0x2219,   -342 },
  { 0x221B, 0x221C,   -343 },
  { 0x2221, 0x2222,   -347 },
  { 0x2224, 0x2224,   -348 },
  { 0x2226, 0x2226,   -349 },
  { 0x222C, 0x222D,   -354 },
  { 0x222F, 0x2233,   -355 },
  { 0x2238, 0x223C,   -359 },
  { 0x223E, 0x2247,   -360 },
  { 0x2249, 0x224B,   -361 },
  { 0x224D, 0x2251,   -362 },
  { 0x2253, 0x225F,   -363 },
  { 0x2262, 0x2263,   -365 },
  { 0x2268, 0x226D,   -369 },
  { 0x2270, 0x2294,   -371 },
  { 0x2296, 0x2298,   -372 },
  { 0x229A, 0x22A4,   -373 },
  { 0x22A6, 0x22BE,   -374 },
  { 0x22C0, 0x2311,   -375 },
  { 0x2313, 0x245F,   -376 },
  { 0x246A, 0x2473,   -386 },
  { 0x249C, 0x24FF,   -426 },
  { 0x254C, 0x254F,   -502 },
  { 0x2574, 0x2580,   -538 },
  { 0x2590, 0x2592,   -553 },
  { 0x2596, 0x259F,   -556 },
  { 0x25A2, 0x25B1,   -558 },
  { 0x25B4, 0x25BB,   -560 },
  { 0x25BE, 0x25C5,   -562 },
  { 0x25C8, 0x25CA,   -564 },
  { 0x25CC, 0x25CD,   -565 },
  { 0x25D0, 0x25E1,   -567 },
  { 0x25E6, 0x2604,   -571 },
  { 0x2607, 0x2608,   -573 },
  { 0x260A, 0x263F,   -574 },
  { 0x2641, 0x2641,   -575 },
  { 0x2643, 0x2E80,   -576 },
  { 0x2E82, 0x2E83,   -577 },
  { 0x2E85, 0x2E87,   -578 },
  { 0x2E89, 0x2E8A,   -579 },
  { 0x2E8D, 0x2E96,   -581 },
  { 0x2E98, 0x2EA6,   -582 },
  { 0x2EA8, 0x2EA9,   -583 },
  { 0x2EAB, 0x2EAD,   -584 },
  { 0x2EAF, 0x2EB2,   -585 },
  { 0x2EB4, 0x2EB5,   -586 },
  { 0x2EB8, 0x2EBA,   -588 },
  { 0x2EBC, 0x2EC9,   -589 },
  { 0x2ECB, 0x2FEF,   -590 },
  { 0x2FFC, 0x2FFF,   -602 },
  { 0x3004, 0x3004,   -606 },
  { 0x3018, 0x301C,   -625 },
  { 0x301F, 0x3020,   -627 },
  { 0x302A, 0x303D,   -636 },
  { 0x303F, 0x3040,   -637 },
  { 0x3094, 0x309A,   -720 },
  { 0x309F, 0x30A0,   -724 },
  { 0x30F7, 0x30FB,   -810 },
  { 0x30FF, 0x3104,   -813 },
  { 0x312A, 0x321F,   -850 },
  { 0x322A, 0x3230,   -860 },
  { 0x3232, 0x32A2,   -861 },
  { 0x32A4, 0x338D,   -862 },
  { 0x3390, 0x339B,   -864 },
  { 0x339F, 0x33A0,   -867 },
  { 0x33A2, 0x33C3,   -868 },
  { 0x33C5, 0x33CD,   -869 },
  { 0x33CF, 0x33D0,   -870 },
  { 0x33D3, 0x33D4,   -872 },
  { 0x33D6, 0x3446,   -873 },
  { 0x3448, 0x3472,   -874 },
  { 0x3474, 0x359D,   -875 },
  { 0x359F, 0x360D,   -876 },
  { 0x360F, 0x3619,   -877 },
  { 0x361B, 0x3917,   -878 },
  { 0x3919, 0x396D,   -879 },
  { 0x396F, 0x39CE,   -880 },
  { 0x39D1, 0x39DE,   -882 },
  { 0x39E0, 0x3A72,   -883 },
  { 0x3A74, 0x3B4D,   -884 },
  { 0x3B4F, 0x3C6D,   -885 },
  { 0x3C6F, 0x3CDF,   -886 },
  { 0x3CE1, 0x4055,   -887 },
  { 0x4057, 0x415E,   -888 },
  { 0x4160, 0x4336,   -889 },
  { 0x4338, 0x43AB,   -890 },
  { 0x43AD, 0x43B0,   -891 },
  { 0x43B2, 0x43DC,   -892 },
  { 0x43DE, 0x44D5,   -893 },
  { 0x44D7, 0x464B,   -894 },
  { 0x464D, 0x4660,   -895 },
  { 0x4662, 0x4722,   -896 },
  { 0x4724, 0x4728,   -897 },
  { 0x472A, 0x477B,   -898 },
  { 0x477D, 0x478C,   -899 },
  { 0x478E, 0x4946,   -900 },
  { 0x4948, 0x4979,   -901 },
  { 0x497B, 0x497C,   -902 },
  { 0x497E, 0x4981,   -903 },
  { 0x4984, 0x4984,   -905 },
  { 0x4987, 0x499A,   -907 },
  { 0x499C, 0x499E,   -908 },
  { 0x49A0, 0x49B5,   -909 },
  { 0x49B8, 0x4C76,   -911 },
  { 0x4C78, 0x4C9E,   -912 },
  { 0x4CA4, 0x4D12,   -917 },
  { 0x4D1A, 0x4DAD,   -924 },
  { 0x4DAF, 0x4DFF,   -925 },
  { 0x9FA6, 0xD7FF, -21827 },
  { 0xE865, 0xF92B, -25943 },
  { 0xF92D, 0xF978, -25944 },
  { 0xF97A, 0xF994, -25945 },
  { 0xF996, 0xF9E6, -25946 },
  { 0xF9E8, 0xF9F0, -25947 },
  { 0xF9F2, 0xFA0B, -25948 },
  { 0xFA10, 0xFA10, -25952 },
  { 0xFA12, 0xFA12, -25953 },
  { 0xFA15, 0xFA17, -25955 },
  { 0xFA19, 0xFA1E, -25956 },
  { 0xFA22, 0xFA22, -25959 },
  { 0xFA25, 0xFA26, -25961 },
  { 0xFA2A, 0xFE2F, -25964 },
  { 0xFE32, 0xFE32, -25966 },
  { 0xFE45, 0xFE48, -25984 },
  { 0xFE53, 0xFE53, -25994 },
  { 0xFE58, 0xFE58, -25998 },
  { 0xFE67, 0xFE67, -26012 },
  { 0xFE6C, 0xFF00, -26016 },
  { 0xFF5F, 0xFFDF, -26110 },
  { 0xFFE6, 0xFFFD, -26116 }
} ;

